<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // add(30,700);  可以先调用后构造函数

        function add(x, y) {

            //  console.log(x + y);
            return x + y;

        }
        //add(10,20);
        var result=add(2,3);
        console.log(result);


        function square(x) {
            console.log(x * x);
        }
        square(2);

    </script>
</body>

</html>